#include <iostream>
#include <cmath>
using namespace std;
typedef long long LL;
#define endl '\n'
const int N = 60;
const double eps = 1e-7;
double a[N][N];
int n;
bool zero(double x)
{
    return fabs(x) < eps;
}

int guass()
{
    for(int i = 1; i <= n; i++)
    {
        int aim = i;
        for(int j = 1; j <= n; j++)
        {
            if(j < i && !zero(a[j][j])) continue;
            if(fabs(a[aim][i]) < fabs(a[j][i])) aim = j;
        }

        if(zero(a[aim][i])) continue;

        for(int j = 1; j <= n + 1; j++) swap(a[aim][j], a[i][j]);

        for(int j = n + 1; j >= i; j--) a[i][j] /= a[i][i];

        for(int j = 1; j <= n; j++)
        {
            if(j == i) continue;
            double t = a[j][i];
            for(int k = i; k <= n + 1; k++) a[j][k] -= a[i][k] * t;
        }
    }
    int ret = 1;
    for(int i = 1; i <= n; i++)
    {
        if(zero(a[i][i]) && zero(a[i][n + 1])) ret = 0;
        if(zero(a[i][i]) && !zero(a[i][n + 1])) return -1;
    }
    return ret;
}

void solve() 
{
    cin >> n;
    for(int i = 1; i <= n; i++)
    {
        for(int j = 1; j <= n + 1; j++)
        {
            cin >> a[i][j];
        }
    }
    int ret = guass();
    if(ret == 1)
    {
        for(int i = 1; i <= n; i++) 
        {
            printf("x%d=%.2lf\n", i, a[i][n + 1]);
        }
    }
    else cout << ret << endl;
}

int main()
{
    ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
    int T = 1;
	// cin >> T;
	while(T--)
	{
        solve();
	}
	return 0;
}